package main

import (
	"flag"
	"gin-extend-demo/run"
)

func main() {
	runType := flag.String("type", "api", "何种方式启动 api/cron")
	flag.Parse()
	if *runType == "api" {
		run.NewAPI()
	} else if *runType == "cron" {
		run.NewCron()
	} else {
		panic("启动类型有误")
	}
}
